/* 자바에서 도스 명령어 실행하기 */

package b_systemAPI;

import java.io.*;
public class ConsolExecute2 {
	InputStream input;
	InputStreamReader reader;
	BufferedReader receive;
	
	public ConsolExecute2(){
		try{
			// 크롬 실행
			Process p2 = null;
			
			//p2 = new ProcessBuilder("C:/Program Files/Google/Chrome/Application/chrome", "http://www.jobtc.kr").start();
			
			// 익스플로러 실행
			//p2 = new ProcessBuilder("C:/Program Files/Internet Explorer/iexplore","http://www.jobtc.kr").start();
			
			// 계산기
			p2 = new ProcessBuilder("calc").start();
			
		}catch(Exception ex){
			ex.printStackTrace();			
		}
	}
	public static void main(String[] args) {
		new ConsolExecute2();
	}

}
